var textNumber=2;

function addTextBox(form, afterElement) {

  // Increment the textbox number

  textNumber++;

  // Create the label

  var label = document.createElement("label");

  // Create the textbox

  var textField = document.createElement("input");

  textField.setAttribute("type","text");

  textField.setAttribute("name","txt"+textNumber);

  textField.setAttribute("id","txt"+textNumber);
  textField.setAttribute("style","width:300px");
  // Add the label's text

  label.appendChild(document.createTextNode("选项"+textNumber+"： "));
  label.appendChild(textField);
  form.insertBefore(label,afterElement);
  //document.getElementById('').innerHTML = "aaa\r\naaa<br/>111"
  return false;
}

function removeTextBox(form) {

if (textNumber> 1) { // If there's more than one text box
    // Remove the last one added

    form.removeChild(document.getElementById("txt"+textNumber).parentNode);

    textNumber--;

  }

}
//境外工作

//学历

var textNumber4=4;

function addTextBox4(form, afterElement) {

  // Increment the textbox number

  textNumber4++;

  // Create the label

  var label = document.createElement("label");

  // Create the textbox

  var textField = document.createElement("input");

  textField.setAttribute("type","text");

  textField.setAttribute("name","other"+textNumber4);

  textField.setAttribute("id","other"+textNumber4);
  textField.setAttribute("style","width:300px");
  // Add the label's text

  label.appendChild(document.createTextNode("选项"+textNumber4+"： "));

  // Put the textbox inside

  label.appendChild(textField);

  // Add it all to the form

  form.insertBefore(label,afterElement);
  //document.getElementById('').innerHTML = "aaa\r\naaa<br/>111"
  return false;

}

function removeTextBox4(form) {

  if (textNumber4> 1) { // If there's more than one text box
    // Remove the last one added

    form.removeChild(document.getElementById("other"+textNumber4).parentNode);
    textNumber4--;

  }

}